////
////  HDClassButton.swift
////  Excited
////
////  Created by X140Yu on 6/15/16.
////  Copyright (c) 2016 X140Yu. All rights reserved.
////
//
//import UIKit
//
//class HHClassButton: UIButton
//{
//    let margin: CGFloat = 2
//    var classInfo: HDClass?
//    let labelMargin: CGFloat = 2
//    let classNameLabel = UILabel()
//
//    required override init(frame: CGRect) {
//        var newFrame = frame
//        
//        newFrame.origin.x += margin
//        newFrame.origin.y += margin
//        newFrame.size.width -= 2 * margin
//        newFrame.size.height -= 2 * margin
//        
//        super.init(frame: newFrame)
//        
//        
//        layoutView()
//    }
//    
//    
//    func layoutView() {
//        
////        let button = self
//        
//        layer.borderWidth = 0.5
//        layer.borderColor = UIColor.whiteColor().CGColor
//        layer.cornerRadius = 5.0
////        backgroundColor = UIColor.redColor()
////        layer.backgroundColor = UIColor.redColor().CGColor
////        button.backgroundColor = UIColor.redColor()
////        button.alpha = 0.8
////        button.backgroundColor
//        
//        classNameLabel.numberOfLines = 0
//        classNameLabel.font = UIFont.boldSystemFontOfSize(12)
//        classNameLabel.textColor = UIColor.whiteColor()
//        classNameLabel.textAlignment = NSTextAlignment.Center
//        classNameLabel.frame = CGRect(x: labelMargin, y: labelMargin, width: self.bounds.width - 2 * labelMargin, height: self.bounds.height - 2 * labelMargin)
//        addSubview(classNameLabel)
//    }
//    
//    required init?(coder aDecoder: NSCoder) {
//        fatalError("init(coder:) has not been implemented")
//    }
//}
//
//
//
//
